﻿using System;
using HumanWorkflow.Interface;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OrderWorkflow.OrderWorkflowWithExternalDsl;

namespace OrderWorkflowWithExternalDslTest
{
    [TestClass]
    public class OrderWorkflowExternalDslTests
    {
        OrderWorkflowTest.OrderWorkflowTest genericTests = new OrderWorkflowTest.OrderWorkflowTest();
 
        [TestMethod]
        public void ExternalDsl_ItemsAreMissingThreadTest()
        {
            OrderWorkflowWithExternalDsl orderWorkflow = new OrderWorkflowWithExternalDsl();
            orderWorkflow.StocksAreOk = false;
            genericTests.ItemsAreMissingThread((IHumanWorkflow)orderWorkflow);
        }

        [TestMethod]
        public void ExternalDsl_ItemsAreAvailableThreadTest()
        {
            OrderWorkflowWithExternalDsl orderWorkflow = new OrderWorkflowWithExternalDsl();
            orderWorkflow.StocksAreOk = true;
            genericTests.ItemsAreAvailableThread((IHumanWorkflow)orderWorkflow);
        }

        [TestMethod]
        public void ExternalDsl_StopWorkflowAtManualStepTest()
        {
            OrderWorkflowWithExternalDsl orderWorkflow = new OrderWorkflowWithExternalDsl();
            orderWorkflow.StocksAreOk = true;
            genericTests.StopWorkflowAtManualStep((IHumanWorkflow)orderWorkflow);
        }

    }
}
